/*
 * (c) 2019 <tanghaifeng-gz@loongson.cn> <pengren.mcu@qq.com>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 *
 */

#ifndef __LS3A3000_7A1000_EVB_CONFIG_H
#define __LS3A3000_7A1000_EVB_CONFIG_H

#define CONFIG_RECOVER

#include "ls3a_common.h"

/* Loongson bootelf bootparam smbios */
#define CONFIG_LOONGSON_BOARD_NAME "LS3A3000-7A1000-EVB"

/* Framebuffer and LCD */
#if defined(CONFIG_VIDEO_LS1X)
#define LS1X_DC0
//#define LS1X_DC0_USE_DEMODE
#define LS1X_DC1
//#define LS1X_DC1_USE_DEMODE
#define LS1X_DC_MAX 2
#endif

#define	CONFIG_EXTRA_ENV_SETTINGS					\
	CONSOLE_STDOUT_SETTINGS \
	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
	"fdt_addr=" __stringify(FDT_LOAD_ADDR) "\0" \
	"rd_start=" __stringify(RAMDISK_START) "\0" \
	"rd_size=" __stringify(RAMDISK_SIZE) "\0" \
	"mtdids=" CONFIG_MTDIDS_DEFAULT "\0"					\
	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"				\
	"splashpos=m,m\0" \
	"video=" "VGA-1:800x600-32@60 video=VGA-2:800x600-32@60" "\0" \
	"panel0=" "vesa800x600@60" "\0" \
	"panel1=" "vesa800x600@60" "\0" \
	"root_dev=sda\0" \
	"rootpart=1\0" \
	"syspart=1\0" \
	"update=1\0" \
	"menucmd=bootmenu\0" \
	"bootmenu_0=System boot select=updatemenu bootselect 1\0" \
	"bootmenu_1=Update kernel=updatemenu kernel 1\0" \
	"bootmenu_2=Update u-boot=updatemenu uboot 1\0" \
	"bootmenu_3=System install or recover=updatemenu system 1\0" \
	"bootmenu_delay=10\0" \

/* ls3x ddr配置 */
#define LOONGSON3A3000
#define LS3A3000
#define loongson3A3

#define DDR3_DIMM
#define LSMC_2
#define USE_LS2H_I2C
#define DDR_FREQ DDR_CLOCK_RATE/1000000

#define LS3_HT
#define LOONGSON_3ASINGLE
#define LS7A

#define BONITO_33M
#define RESERVED_COREMASK 0xfff0
#define SHUTDOWN_MASK 0x0000
#define BOOTCORE_ID 0

#define AUTO_DDR_CONFIG
#define DDR_RESET_REVERT

#define CPU_FREQ  CPU_CLOCK_RATE
#define CORE_FREQ CPU_CLOCK_RATE
#define SYS_CLOCK 100 //MUST BE 100 or 25, depend on the osillator

#endif	/* __LS3A3000_7A1000_EVB_CONFIG_H */
